package lsdm.jmeter;

import java.io.*;

public class ReadAndWrite {

    public static void readFile2Write(String dir, String readFile, String writeFile) {
        try {
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(dir + readFile)));
            FileWriter fileWriter = new FileWriter(dir + writeFile);
            String s;
            while ((s = bufferedReader.readLine()) != null) {
                fileWriter.write(s + "," + "hello world!\r\n");
            }
            fileWriter.close();
            bufferedReader.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
